home *** CD-ROM | disk | FTP | other *** search
- /***************************************************** IMPLEMENTATION
- DATE: 9/20/93
- AUTHOR: Eric R. Rosé
-
- CLASS: CPPStaticText
-
- SUPERCLASS: CPPObject
-
- This C++ class displays a static text item
-
- ********************************************************************/
-
- #pragma once
-
- #include <CPPVisualObject.h>
- #include <Quickdraw.h>
-
- extern RGBColor RGBWhite;
- extern RGBColor RGBBlack;
-
- class CPPStaticText : public CPPVisualObject {
- public:
-
- CPPStaticText (CPPWindow *itsWindow, Rect *itsBounds,
- int StrID, int Font = geneva,
- int FSize = 9, int FJust = teCenter,
- int FStyle = normal,
- RGBColor *FColor = &RGBBlack,
- Boolean canBeTarget = FALSE,
- Boolean active = TRUE,
- Boolean visible = TRUE);
- CPPStaticText (CPPWindow *itsWindow, Rect *itsBounds,
- StringPtr theString, int Font = geneva,
- int FSize = 9, int FJust = teCenter,
- int FStyle = normal,
- RGBColor *FColor = &RGBBlack,
- Boolean canBeTarget = FALSE,
- Boolean active = TRUE,
- Boolean visible = TRUE);
- ~CPPStaticText (void);
-
- virtual char *ClassName (void);
-
- virtual void Draw (void);
-
- virtual void MakeVisible (Boolean nowVisible);
-
- virtual Rect *GetBounds (void);
-
- void SetitsString (StringPtr newString, Boolean keepCopy);
- StringPtr GetitsString (void);
-
- protected:
- StringPtr itemText;
- short fontID;
- short fontSize;
- short fontJust;
- short fontStyle;
- RGBColor fontColor;
- Rect textBounds;
-
- virtual void MoveContent (short newH, short newV);
- virtual void ResizeContent (short newWidth, short newHeight);
- void MakeStatText (Rect *itsBounds, short Font, short FSize,
- short FJust, short FStyle,
- RGBColor *FColor);
- };